#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main() {
    int num, c = 0, i, t;
    double sum=0;


    scanf("%d", &num);
    if (num == 0) {
        puts("average = 0");
        printf("count = 0");
    }
    else {
        for (i = 0; i < num; i++) {
            scanf("%d", &t);
            sum += t;
            if (t >= 60)
                c += 1;
        }
        sum = sum / num;
        printf("average = %.1f\n", sum);
        printf("count = %d", c);

        
        int y;
        scanf("%d", &y);

        if (y <= 2000 || y > 2100)
            printf("Invalid year!");
        else if (y >= 2004)
            for (i = 2001; i <= y; i++) {
                if (i % 400 == 0 && i % 100 != 0 || i % 4 == 0 && i % 100 != 0)
                    printf("%d\n", i);
            }
        else
            printf("None");
    }
    return 0;
}